﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace KTV
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {

        }


        /// <summary>
        /// 窗体加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            dian();
            this.timer1.Start();//启动计时器
        }



        /// <summary>
        /// 点歌按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            
        }

        /// <summary>
        /// 点歌按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void dian()
        {
            int hw = button1.Height;
            if (hw > button1.Width) hw = button1.Width;
            GraphicsPath gp = new GraphicsPath();
            gp.AddEllipse(2, 3, hw - 3, hw - 3);
            gp.FillMode = FillMode.Winding;
            button1.BackColor = Color.Blue;
            button1.Region = new Region(gp);
        }

        /// <summary>
        /// 首页界面悬浮文字
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void timer1_Tick(object sender, EventArgs e)
        {
            this.label1.Left -= 3;  //向左移动3个像素

            //移动到窗体最左端后从最右端进入窗体
            if (this.label1.Right < 0)
            {
                this.label1.Left = this.Width;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
           
        }
    }
}
